<?php
/** @var Array of menu items */ $items = $sf_data->getRaw('items');
?>

<?php
foreach ($items as $key => $item):
    if (sfJqueryDash::hasPermission($item, $sf_user)):
        if (($items_in_menu && $item['in_menu']) || (!$items_in_menu && !$item['in_menu'])):
            ?>
<li <?php echo $item['in_menu']? 'class="ui-widget-content ui-allow-hover ui-corner-all"':'class="ui-widget-content ui-allow-hover ui-corner-all"'; ?>>
    <a href="<?php echo url_for($item['url']) ?>" title="<?php echo $item['name']; ?>">
                    <?php if (sfJqueryDash::getProperty('resize_mode') == 'thumbnail'):
                        echo image_tag(substr($item['image'], 0, strrpos($item['image'], '/')).'/small/'.substr($item['image'], strrpos($item['image'], '/') + 1), array('align' => 'ABSMIDDLE', 'alt' => $item['name'], 'width' => '16', 'height' => '16'));
                    else:
                        echo image_tag($item['image'], array('alt' => $item['name'], 'width' => '16', 'height' => '16'));
                    endif; ?>
        <span><?php echo $item['name']; ?></span>
    </a>
</li>
        <?php
        endif;
    endif;
endforeach;
?>